package com.gszyxy.mallfour.consumer.service.impl;

import com.gszyxy.mallfour.consumer.mapper.ConsumerMapper;
import com.gszyxy.mallfour.consumer.params.ConsumerRequestParams;
import com.gszyxy.mallfour.consumer.pojo.Consumer;
import com.gszyxy.mallfour.consumer.service.ConsumerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ConsumerServiceImpl implements ConsumerService {

    @Resource
    private ConsumerMapper consumerMapper;

    @Override
    public int register(ConsumerRequestParams consumerRequestParams) {
        return consumerMapper.register(consumerRequestParams);
    }

    @Override
    public Consumer login(ConsumerRequestParams consumerRequestParams) {
        return consumerMapper.login(consumerRequestParams);
    }

    @Override
    public Consumer findByAccount(String account) {
        return consumerMapper.findByAccount(account);
    }

}

